From: Dan Winship Date: Wed, 13 Oct 2010 18:10:38 +0000 (-0400) Subject: PopupSwitchMenuItem: don't misuse this.active X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9609 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e5dd86276de93159dbaa6818df94c9ec38f3ecf4;p=gnome-shell.git PopupSwitchMenuItem: don't misuse this.active The constructor was setting this.active to reflect the switch state, which is wrong; this.active indicates whether or not the item is highlighted. https://bugzilla.gnome.org/show_bug.cgi?id=621671 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 7ef3bbb8a..23969a6a5 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -508,9 +508,8 @@ PopupSwitchMenuItem.prototype = { _init: function(text, active) { PopupBaseMenuItem.prototype._init.call(this); - this.active = !!active; this.label = new St.Label({ text: text }); - this._switch = new Switch(this.active); + this._switch = new Switch(active); this.addActor(this.label); this.addActor(this._switch.actor);